Dynomotion

Group: DynoMotion Message: 10143 From: cnc_machines Date: 9/8/2014
Subject: Steps To Get Running
Greetings,

I feel a bit ignorant in asking this question - there is a lot of documentation and I am trying to get my feet under me. I am basically wanting to know all of the screens which need to be configured to get up and running with the Kstep. So far I have done the following.

1. Wired motors - on my desk to the K-step. They will move when I use the step response screen.
2. Set up the Axis configuration in the "Trajectory Planner Screen"

What else do I need to do before I can load a sample G-Code program and spin the motors on my desk? Perhaps an obvious question - How do I set up channel "0" to be the "X" axis, "1" to be the "Y", and "2" to be the "A" axis.

Thanks again for helping with my basic questions.

Scott


Group: DynoMotion Message: 10144 From: Moray Cuthill Date: 9/8/2014
Subject: Re: Steps To Get Running
Hi,
 
one thing I do think is lacking, is a general getting started guide, so here's a quick guide.
 
First off, split the setup in two, between the KFlop, and KMotionCNC.
Before you can progress to KMotionCNC, you need to have your KFlop configured correctly, which you do via KMotion, and ultimately an initialisation C file. I usually refer to it as your init.c file, although it can have any name you like.
 
I'm assuming you're running open loop.
First of you need to use the Config & Flash screen to set the output mode for each channel. One thing to remember about using the C&F screen, is it is not real time. I.e. any values already set, may not match the current values being used by the KFlop unless you have already downloaded the channel, and any changes you make will not be changed in the KFlop until you upload the channel.
Once you've got the basic output mode set, you then need to set the motion profile (max Velocity, Acceleration & Jerk) in the Step Response screen. The SR screen is updated when you select a channel, although I'm not entirely sure when the settings get updated in the KFlop
 
Once you have those basic settings sorted, you can select the C Code -> Clipboard button in the Config&Flash screen, which copies all the required configuration information for the current axis into the clipboard, ready to be pasted into your init.c file.
Alternatively, since you're running openloop, it's probably easier to just use the supplied example initKStep3axis.c file, and edit the axis values to suit. The only values you'll likely need to alter are the Vel, Accel & Jerk values, however the set values will most likely be good enough for motors on desk testing.
 
The key line in the init.c file for allocating channels to axis, is -
DefineCoordSystem(0,1,2,-1)
 
That assumes channel 0 is X, 1 is Y, 2 is Z, and A is not used so is set to -1.
Any channel can be set to any axis simply by editting this line.
 
Once you have your init.c file created, you can then configure KMotionCNC.
However, I'm a Mach3 user, so somebody else will need to explain how to setup KMotionCNC!
 
Moray

On Mon, Sep 8, 2014 at 9:50 PM, cnc_machines@... [DynoMotion] <DynoMotion@yahoogroups.com> wrote:
 

Greetings,

I feel a bit ignorant in asking this question - there is a lot of documentation and I am trying to get my feet under me. I am basically wanting to know all of the screens which need to be configured to get up and running with the Kstep. So far I have done the following.

1. Wired motors - on my desk to the K-step. They will move when I use the step response screen.
2. Set up the Axis configuration in the "Trajectory Planner Screen"

What else do I need to do before I can load a sample G-Code program and spin the motors on my desk? Perhaps an obvious question - How do I set up channel "0" to be the "X" axis, "1" to be the "Y", and "2" to be the "A" axis.

Thanks again for helping with my basic questions.

Scott



Group: DynoMotion Message: 10149 From: cnc_machines Date: 9/8/2014
Subject: Re: Steps To Get Running
Moray,

Thanks for the help. I am definitely struggling to understand the overall architecture of the program. I appreciate your help. How is everyone else learning this, is it documented somewhere that I am missing?

A few more questions:

1. C Programs - Is the "Init" program the main one that is used to run the kflop board?
2. Threads - Currently all of the threads have some sort of program in them. I thought these were used for custom features such as homing axis, etc.?
3. Why are there programs already in these threads? Is there a particular order where they need to be placed? For example - "init" should be the first thread, homing should be the second?

Perhaps I would know this if I was a full time programmer, so pardon my ignorance.

Scott
Group: DynoMotion Message: 10160 From: Moray Cuthill Date: 9/9/2014
Subject: Re: Steps To Get Running
I think most people just give it a go, and pick up things as they go along, and asking questions to fill in the blanks.
I have often thought about putting together some kind of getting started guide, as for somebody new, a KFlop is pretty daunting to setup.
 
1) Yes the init.c is what gets used to configure the KFlop for normal use. Without it, you would need to to manually load all the settings via the various KMotion pages everytime you rebooted the KFlop.
When you start KMotionCNC/Mach3 this file should get loaded automatically to configure the KFlop ready for use.
 
2/3) The C Program window can be a bit misguided. The KFlop is capable of running 7 user threads, which is why you have 7 buttons/pages/threads. However, the C programs loaded into each page, are not necessarily what the KFlop is running, they're just whatever program happened to be loaded into that page last in KMotion. You can load, edit and compile programs as much as you want, but nothing will happen to the KFlop until you Download and Run the program.
The only part of the C Program window that gets updated by the KFlop, is the selection button will turn green if that thread is running, but it does not mean it's running the same program as what's being displayed.
 
Generally your init.c gets loaded into the 1st thread, then depending on what interface (i.e. KMotionCNC/Mach3) you're using, other threads will be loaded as and when called. AFAIK there is no operationl difference in what thread is being used, as they all get equal access to the hardware and an equal share of processing power/time.
 
 
One of the big issues you're probably facing, is the KFlop is a very powerful and flexible controller and the software has lots of options and features to reflect that, which for a high proportion of users, a fair number of those options and features will rarely if ever be used, so it's a case of filtering out all those options.
 
Moray
 
 
 

On Tue, Sep 9, 2014 at 12:46 AM, cnc_machines@... [DynoMotion] <DynoMotion@yahoogroups.com> wrote:
 

Moray,

Thanks for the help. I am definitely struggling to understand the overall architecture of the program. I appreciate your help. How is everyone else learning this, is it documented somewhere that I am missing?

A few more questions:

1. C Programs - Is the "Init" program the main one that is used to run the kflop board?
2. Threads - Currently all of the threads have some sort of program in them. I thought these were used for custom features such as homing axis, etc.?
3. Why are there programs already in these threads? Is there a particular order where they need to be placed? For example - "init" should be the first thread, homing should be the second?

Perhaps I would know this if I was a full time programmer, so pardon my ignorance.

Scott


Group: DynoMotion Message: 10207 From: timbosaurus Date: 9/25/2014
Subject: Re: Steps To Get Running
Moray, thanks!

I'm a new user with an embedded systems design background and been running my router with mach3 for a while now, so I thought I'd have no issues getting up and running with the kflop/kstep.    But like you suggest, it certainly did take a little while to get the my head around how all the bits work together, and a still dont think i'm there yet... hence why i'm spending a bit of time on here.

I have always preferred to learn from first principles (not from step by step hand-holding) so I really appreciate the tips you guys have written explaining how the system fundamentally works together, and not just showing how to write some code to do or wire up I/O.   

I just thought I'd give some feedback from a new user that *shouldn't* have had too many issues:

I think that the way the various screens/systems are structured is not particularity intuitive to a new user (Tom, please don't misinterpret this as me saying it's a poor product!).  So a lot of questions seem to come up because the most basic concepts are misunderstood or unknown by the new users, yet taken for granted by old users.

Some examples I've seen so far of simple stuff causing confusion:

By having multiple possibilities for generating motion (eg: Kmotion C&F screen, Kmotion CNC jogging, gcode, C programs running over on the DSP, etc), it's often hard to conceptualize what is actually running the show.  This gets a bit confusing when you're trying to understand which settings to adjust and how they will impact the end motion.

There are many areas to adjust parameters like Vel/Acc/Jerk (C&F screen, Kmotion CNC config, init.c, etc), and it's not clear to a new user whether these configurations are actually changing some persistent setting on the kflop, or just updating a config file for that application, or storing the setting into a c-program that then needs to be run... and should this C-program be run on opening a specific application, or set to run on the DSP upon kflop startup.

I understand however, that all these options create a very powerful and configurable system, and I hope to keep reading up around here until I fully understand the concept, at which point I'll forget what it was like trying to customize/troubleshoot it with a fundamental flaw in my understanding of it :)

 Cheers,
Timbo
Group: DynoMotion Message: 10214 From: Tom Kerekes Date: 9/26/2014
Subject: Re: Steps To Get Running
Hi Timbo,

Thanks for the feedback.

We have a flash video to try to explain how parameters in KFLOP can be changed:


Had you watched that?  Did it help?

Regards
TK



From: "timbosaurus@... [DynoMotion]" <DynoMotion@yahoogroups.com>
To: DynoMotion@yahoogroups.com
Sent: Thursday, September 25, 2014 6:45 PM
Subject: [DynoMotion] Re: Steps To Get Running

 
Moray, thanks!

I'm a new user with an embedded systems design background and been running my router with mach3 for a while now, so I thought I'd have no issues getting up and running with the kflop/kstep.    But like you suggest, it certainly did take a little while to get the my head around how all the bits work together, and a still dont think i'm there yet... hence why i'm spending a bit of time on here.

I have always preferred to learn from first principles (not from step by step hand-holding) so I really appreciate the tips you guys have written explaining how the system fundamentally works together, and not just showing how to write some code to do or wire up I/O.   

I just thought I'd give some feedback from a new user that *shouldn't* have had too many issues:

I think that the way the various screens/systems are structured is not particularity intuitive to a new user (Tom, please don't misinterpret this as me saying it's a poor product!).  So a lot of questions seem to come up because the most basic concepts are misunderstood or unknown by the new users, yet taken for granted by old users.

Some examples I've seen so far of simple stuff causing confusion:

By having multiple possibilities for generating motion (eg: Kmotion C&F screen, Kmotion CNC jogging, gcode, C programs running over on the DSP, etc), it's often hard to conceptualize what is actually running the show.  This gets a bit confusing when you're trying to understand which settings to adjust and how they will impact the end motion.

There are many areas to adjust parameters like Vel/Acc/Jerk (C&F screen, Kmotion CNC config, init.c, etc), and it's not clear to a new user whether these configurations are actually changing some persistent setting on the kflop, or just updating a config file for that application, or storing the setting into a c-program that then needs to be run... and should this C-program be run on opening a specific application, or set to run on the DSP upon kflop startup.

I understand however, that all these options create a very powerful and configurable system, and I hope to keep reading up around here until I fully understand the concept, at which point I'll forget what it was like trying to customize/troubleshoot it with a fundamental flaw in my understanding of it :)

 Cheers,
Timbo


Group: DynoMotion Message: 10216 From: timbosaurus Date: 9/26/2014
Subject: Re: Steps To Get Running
Tom, thanks, it sounds promising! I'm usually using my phone while in the shed, so anything with flash has been overlooked. I'll check it out when I'm back in the house.

I've now read a truckload of random threads here, and starting to get my head around it all now. I guess it's a bit like an idiot filter :)

It's now time to start writing some code and get this little open loop 3 axis mill running better. I'm getting seriously low torque on all my steppers (compared to how they were with the original Chinese driver), even at low speeds. I've checked with a scope, and it's still getting the full 24v, so voltage isn't the issue, so I'm thinking it might be something to do with pulse width.

Cheers, Timbo
Group: DynoMotion Message: 10218 From: Hugh Sontag Date: 9/27/2014
Subject: Re: Steps To Get Running
Hi Timbo,

I would agree with your assessment, that it's very hard to get started. I am a degreed electrical engineer and software engineer with 38 years of experience with electronics.

I am used to reading manuals and digging into systems to learn how they work. I concluded that the "manual" doesn't really address setup. In other words, you can't get started by reading, because the critical information isn't there in a form that can be decoded. 

What I found missing was a detailed step-by-step guide to setting up, for each different type of system (stepper motor drive, Snap Amp drive, brushless DC motor configuration, etc), along with an explanation of why one performs the steps and calculations.

The only thing that works is to ask questions. Fortunately, Tom is very good about answering them!

Hugh  


On Thu, Sep 25, 2014 at 8:45 PM, timbosaurus@... [DynoMotion] <DynoMotion@yahoogroups.com> wrote:
 

Moray, thanks!


I'm a new user with an embedded systems design background and been running my router with mach3 for a while now, so I thought I'd have no issues getting up and running with the kflop/kstep.    But like you suggest, it certainly did take a little while to get the my head around how all the bits work together, and a still dont think i'm there yet... hence why i'm spending a bit of time on here.

I have always preferred to learn from first principles (not from step by step hand-holding) so I really appreciate the tips you guys have written explaining how the system fundamentally works together, and not just showing how to write some code to do or wire up I/O.   

I just thought I'd give some feedback from a new user that *shouldn't* have had too many issues:

I think that the way the various screens/systems are structured is not particularity intuitive to a new user (Tom, please don't misinterpret this as me saying it's a poor product!).  So a lot of questions seem to come up because the most basic concepts are misunderstood or unknown by the new users, yet taken for granted by old users.

Some examples I've seen so far of simple stuff causing confusion:

By having multiple possibilities for generating motion (eg: Kmotion C&F screen, Kmotion CNC jogging, gcode, C programs running over on the DSP, etc), it's often hard to conceptualize what is actually running the show.  This gets a bit confusing when you're trying to understand which settings to adjust and how they will impact the end motion.

There are many areas to adjust parameters like Vel/Acc/Jerk (C&F screen, Kmotion CNC config, init.c, etc), and it's not clear to a new user whether these configurations are actually changing some persistent setting on the kflop, or just updating a config file for that application, or storing the setting into a c-program that then needs to be run... and should this C-program be run on opening a specific application, or set to run on the DSP upon kflop startup.

I understand however, that all these options create a very powerful and configurable system, and I hope to keep reading up around here until I fully understand the concept, at which point I'll forget what it was like trying to customize/troubleshoot it with a fundamental flaw in my understanding of it :)

 Cheers,
Timbo


Group: DynoMotion Message: 10219 From: Tom Kerekes Date: 9/27/2014
Subject: Re: Steps To Get Running
Hi Timbo,

Regarding low torque on motors connected to KSTEP: did you set the current levels for your motors using the KSTEP Current Setting Jumpers?

http://www.dynomotion.com/Help/SchematicsKStep/ConnectorsKStep.htm

You can't really look at the motor voltage with a voltmeter because the voltage will be switching on and off to regulate current.

HTH
Regards
TK
 



From: "timbosaurus@... [DynoMotion]" <DynoMotion@yahoogroups.com>
To: DynoMotion@yahoogroups.com
Sent: Friday, September 26, 2014 8:09 PM
Subject: [DynoMotion] Re: Steps To Get Running

 
Tom, thanks, it sounds promising! I'm usually using my phone while in the shed, so anything with flash has been overlooked. I'll check it out when I'm back in the house.

I've now read a truckload of random threads here, and starting to get my head around it all now. I guess it's a bit like an idiot filter :)

It's now time to start writing some code and get this little open loop 3 axis mill running better. I'm getting seriously low torque on all my steppers (compared to how they were with the original Chinese driver), even at low speeds. I've checked with a scope, and it's still getting the full 24v, so voltage isn't the issue, so I'm thinking it might be something to do with pulse width.

Cheers, Timbo


Group: DynoMotion Message: 10220 From: timbosaurus Date: 9/27/2014
Subject: Re: Steps To Get Running
Hugh,

I have never EVER seen someone so helpful, supportive, and knowledgeable about their product as tom.

My problem was that my application is as simple as the come, so I thought I could start out running with a little info from the manuals, fumble my way along, and build on the extra features from there later.

Now I'm seeing that all the info is actually there, having read through the website, and most of the yahoo threads from the last year, and many of the cnczone threads, so I'm starting to get the hang of it.

So I think I now know enough to understand why I had issues, and it was just that the info/tips/suggestions were not sequential/progressive/in the order of "difficulty", so u skip over things in the manual that seem unimportant for your particular use. You then try and search through the yahoo groups, but you don't really know what your actually searching for, and that is obviously in the order that ppl ask it, not in order of difficulty either.

So then you just ask Tom, who answers straight away with infinite patience, despite the fact he's probably answered the exact question 3000 times before, lol.
Group: DynoMotion Message: 10222 From: timbosaurus Date: 9/27/2014
Subject: Re: Steps To Get Running
Tom, that video is great!  If I was able to watch that on my phone (which has no flash capability) it would have helped me immensely from the start.

Maybe I'm unique in that aspect, but would it be difficult for you to put any future videos as a youtube link instead?

Regarding looking at the voltage, I was looking with a scope (not multimeter), so was only talking about peak voltage of 24V.  But as always, you are right about the current jumpers.  In my haste, I had read the line in the manual that is just above, saying that performance is best with these jumpers removed... so I left them removed **embarrassed**.  I now see that line refers to different jumpers.

Thanks again Tom, I'm getting there and loving the hardware!

Timbo
Group: DynoMotion Message: 10404 From: cnc_machines Date: 10/28/2014
Subject: Re: Steps To Get Running
Moray,

I have a question for the syntax on setting up the axis:

I am using an X, Y, and A Axis. So would I set things up like this?

DefineCoordSystem(0,1,-1,2)

Thanks,

Scott
Group: DynoMotion Message: 10407 From: Moray Cuthill Date: 10/28/2014
Subject: Re: Steps To Get Running
Tom would be the person to confirm, but it looks good to me.
 
The values are X,Y,Z,A and you assign whatever channel to the axis, setting any unused to -1, so it should be good.
 
Moray

On Tue, Oct 28, 2014 at 11:26 PM, cnc_machines@... [DynoMotion] <DynoMotion@yahoogroups.com> wrote:
 

Moray,

I have a question for the syntax on setting up the axis:

I am using an X, Y, and A Axis. So would I set things up like this?

DefineCoordSystem(0,1,-1,2)

Thanks,

Scott


Group: DynoMotion Message: 10409 From: Jack Gizienski Date: 10/28/2014
Subject: Re: Steps To Get Running

I think the -1 has to be in the last position.  The -1 tells Kflop that there are no more axis.

 

DefineCoordSystem(0,1,2,-1);

 

This assumes that you have defined axis 0, 1 and 2.

 

Jack

 

From: DynoMotion@yahoogroups.com [mailto:DynoMotion@yahoogroups.com]
Sent: Tuesday, October 28, 2014 7:48 PM
To: DynoMotion@yahoogroups.com
Subject: Re: [DynoMotion] Re: Steps To Get Running

 

 

Tom would be the person to confirm, but it looks good to me.

 

The values are X,Y,Z,A and you assign whatever channel to the axis, setting any unused to -1, so it should be good.

 

Moray

 

On Tue, Oct 28, 2014 at 11:26 PM, cnc_machines@... [DynoMotion] <DynoMotion@yahoogroups.com> wrote:

 

Moray,

I have a question for the syntax on setting up the axis:

I am using an X, Y, and A Axis. So would I set things up like this?

DefineCoordSystem(0,1,-1,2)

Thanks,

Scott

 

Group: DynoMotion Message: 10410 From: Moray Cuthill Date: 10/28/2014
Subject: Re: Steps To Get Running
Jack,
 
the -1 tells the KFlop that that axis is not enabled.
 
If you look at the KMotionDef.h file, which defines all the available KFlop functions, it shows the defined functions along with what parameters they accept.
The relevant lines for DefineCoordSystem are -
void DefineCoordSystem(int axisx, int axisy, int axisz, int axisa); // define axis chan numbers to use as x,y,z,a (set -1 to disable)
void DefineCoordSystem6(int axisx, int axisy, int axisz, int axisa, int axisb, int axisc); // define axis chan numbers to use as x,y,z,a,b,c (set -1 to disable)
void DefineCoordSystem8(int axisx, int axisy, int axisz, int axisa, int axisb, int axisc, int axisu, int axisv); // define axis chan numbers to use as x,y,z,a,b,c,u,v (set -1 to disable)
As you can see there are three versions (I never knew there was an 8axis option, I always thought 6 was the limit!), and the axis channels need to be assigned in the order specified.
So in Scott's case, as he wants to use X,Y & A, his arguments of (0,1,-1,2) should be correct.
 
Moray
 

On Wed, Oct 29, 2014 at 12:08 AM, 'Jack Gizienski' jackgiz@... [DynoMotion] <DynoMotion@yahoogroups.com> wrote:
 

I think the -1 has to be in the last position.  The -1 tells Kflop that there are no more axis.

 

DefineCoordSystem(0,1,2,-1);

 

This assumes that you have defined axis 0, 1 and 2.

 

Jack

 

From: DynoMotion@yahoogroups.com [mailto:DynoMotion@yahoogroups.com]
Sent: Tuesday, October 28, 2014 7:48 PM
To: DynoMotion@yahoogroups.com
Subject: Re: [DynoMotion] Re: Steps To Get Running

 

 

Tom would be the person to confirm, but it looks good to me.

 

The values are X,Y,Z,A and you assign whatever channel to the axis, setting any unused to -1, so it should be good.

 

Moray

 

On Tue, Oct 28, 2014 at 11:26 PM, cnc_machines@... [DynoMotion] <DynoMotion@yahoogroups.com> wrote:

 

Moray,

I have a question for the syntax on setting up the axis:

I am using an X, Y, and A Axis. So would I set things up like this?

DefineCoordSystem(0,1,-1,2)

Thanks,

Scott

 


Group: DynoMotion Message: 10411 From: Tom Kerekes Date: 10/28/2014
Subject: Re: Steps To Get Running
Hi Jack,

Moray is correct.  A -1 indicates that that axis is not in use.

Thanks Moray.  KFLOP can do 8 axes of coordinated motion, but KMotionCNC and Mach3 only support 6.

Regards
TK

Group: DynoMotion Message: 10805 From: jojodillinger Date: 1/12/2015
Subject: Re: Steps To Get Running
Hi all,

this is a very helpful thread for new users. Aside from the flash video in the dynomotion help of course:-)

However, I still have some things that are not clear to me.. I will do one by one, and as they come up, in this thread. Maybe thats the easiest:)

1)
As I understand, the motor settings are downloaded to the KFlop with KMotion and remain in there without having to run KMotion every time I want to start working. At the same time, I can generate a C-File from these motor settings (and call it for example motor_settings_for_my_router.c). Is this file used anywhere then?
I guess this is the init-file, referred to above, but in KMotionCNC I can nowhere define the location/name of an init-file.
Maybe KMotionCNC just uses what it can find in the KFLOP instead?

2)
When "saving/compiling/downloading" a C-Programm in KMotion, it means that its transferred to KFLOP, right? How can I then use it in KFLOP?

3)
KMotionCNC itself has an option to define buttons that execute C-Programs. Is this the common way to, for example, automatically drive to the tool length sensor and measure? Or drive the axes to their home positions?

Thanks a lot!
Kind regards,

Johannes
Group: DynoMotion Message: 10806 From: Moray Cuthill Date: 1/12/2015
Subject: Re: Steps To Get Running
Hi Johannes,
 
I'll try and fill in the details.
 
1) Everytime you power up the KFlop, you need to reload the settings (unless you flash them in, however that's not recommended for normal use, so best to ignore that feature!). This is done via the magical init.c file often mentioned. This file can be called whatever you want, however for simplicity everybody simply refers to their own file as init.c (plus it's easier to type!).
In KMotionCNC, this is done via the INIT button. To select your own init file, go Tool Setup -> User Buttons tab, then for the INIT button (should be the top button in the tab), from the drop down menu select Execute Prog, at which point extra boxes appear allowing you to select the thread the file is to be loaded in (usually 0 for the init.c file), and for selecting your init.c file.
 
2) This is more for setup/testing purposes. When you click download, whatever file in the window you are working on is transferred to the relevant thread in KFlop. Once your file is working, you can then assign it to a button as per 1).
 
3) Yes. The more advanced option is to customise a screen to suit your needs.
The other option is to assign C programmes to the relevant M/G-codes, then invoke them via MDI/G-Code without using screen buttons.
 
Moray

On Mon, Jan 12, 2015 at 10:06 PM, jojodillinger@... [DynoMotion] <DynoMotion@yahoogroups.com> wrote:
 

Hi all,

this is a very helpful thread for new users. Aside from the flash video in the dynomotion help of course:-)

However, I still have some things that are not clear to me.. I will do one by one, and as they come up, in this thread. Maybe thats the easiest:)

1)
As I understand, the motor settings are downloaded to the KFlop with KMotion and remain in there without having to run KMotion every time I want to start working. At the same time, I can generate a C-File from these motor settings (and call it for example motor_settings_for_my_router.c). Is this file used anywhere then?
I guess this is the init-file, referred to above, but in KMotionCNC I can nowhere define the location/name of an init-file.
Maybe KMotionCNC just uses what it can find in the KFLOP instead?

2)
When "saving/compiling/downloading" a C-Programm in KMotion, it means that its transferred to KFLOP, right? How can I then use it in KFLOP?

3)
KMotionCNC itself has an option to define buttons that execute C-Programs. Is this the common way to, for example, automatically drive to the tool length sensor and measure? Or drive the axes to their home positions?

Thanks a lot!
Kind regards,

Johannes


Group: DynoMotion Message: 10807 From: Tom Kerekes Date: 1/12/2015
Subject: Re: Steps To Get Running
Hi Johannes,

Regarding:

#1 - Not really.  The settings will not remain in KFLOP after a power loss (unless they are Flashed which we do not recommend).  After a power loss KFLOP must be reconfigured from scratch by either using KMotion.exe to download settings from the various screens, or by compiling/downloading/executing a C Program in KFLOP to set them.  For final operation the C Program will always be used and KMotion.exe is no longer used or needed.  The C program can do other things besides setting configuration parameters.  It can enable axes, define the coordinate system, turn on relays, pumps, enable drives, whatever might be required for your particular system.  The C program may also continue to run in a loop after everything is configured to watch, monitor, and service other things for your system such as external buttons, EStop conditions, MPGs, etc...

After you have created the C Program to do everything required for your system give it a unique name.  Then from any application (Mach3, KMotionCNC, or your own custom application) all you need to do is run it to fully initialize your system.

For KMotionCNC configure a User Button to Execute it.

#2

"saving" = saving the C file to the PC's Hard disk
"compiling" = compiling the C file into binary machine code that KFLOP can execute and saving the binary code onto the PC's hard drive (*.out file type)
"downloading" = Transferring the machine code from the PC to one of KFLOP's Thread's memory spaces
"execute" = Telling KFLOP to execute the code

#3

Correct.  Most anything can be accomplished by running a C Program.  So common things include: Initialization, Homing, Probing, Spindle Control, Tool Changes, etc...

HTH
Regards
TK




Group: DynoMotion Message: 10810 From: jojodillinger Date: 1/12/2015
Subject: Re: Steps To Get Running

Hi Moray, Tom,

great, thanks for the clarification! All much clearer now. So KMotion in my case will be mainly used to generate settings for my motors, and for testing programs I write for doing jobs that will be required more often in normal operation (like tool change and measurement). In KMotionCNC I can assign a button to these and execute them. Aside from the "regular" GCode-loading and processing.

In the installation folder I saw a lot of C-Code, which probably then is meant as a starting point for own developments. Such as tool change. I will have a close look

As I understood (a question I forgot previsouly..), flashing should mainly be used for firmware related issues, not for saving own software on the KFLOP.

I guess at the moment this answers all my questions:)

Thanks again and kind regards,

Johannes

 
Group: DynoMotion Message: 10813 From: jojodillinger Date: 1/13/2015
Subject: Re: Steps To Get Running
Hello,
ok, after quite a bit more reading I have some new questions, one by one.. Sorry already if those appear silly..:)

1)
I am a bit confused concerning velocity / acceleration (V / A) settings..
In KMotion.exe I define V and A in the "Step Response" screen.

a)
According to the manual, I should I fill in here the maximum allowable/meaningful values for the motors, right?

b)
What does the unit "position units per second" for the velocity mean? Does this relate to the "Inv Dist Per Cycle"? If the latter variable is set to default 1.0, the a "position unit" is equal to a full step? Or is it a microstep?

c)
In which kind of operation are these velocity and acceleration (defined in KMotion.exe) applied?



2)
In KMotionCNC.exe, I can specify axis parameters: counts/inch, velocity and acceleration.

a)
No matter whats defined in other windows, files.. this definitely is inch and not metric system, right? The manual is very clear about this, just wanted to be sure:)

b)
I suppose "counts/inch" is fully related to my machine: here I have to define, how many counts are required for one inch translation. Dont I need the number of microsteps per step then? Somewhere I read, that KFLOP is fixed to 16 microsteps. In this case 1 count would be 1/16 of a step (in my case one step is 1.8 deg rotation of the stepper motor). Is this correct?


3)
The velocity in inch/sec that I specify in KMotionCNC.exe, how does this compare to the velocity I specify in KMotion.exe (question 1)? Can you tell me which one is used where?

4)
If counts/inch, velocities, acceleration from the trajectory planer are the ones that count: can they be implemented in the initialization C-File as well? Or is there another way of backing up those?
In the end it would be really cool to have the initilization C-File, which fully defines the machine parameters.
Currently, as I understand, the actual machine parameters (in trajectory planer) are not part of the C-File.


Again, sorry for this hughe list. I hope that most of them can be answered very short..:)

Kind regards,

Johannes
Group: DynoMotion Message: 10814 From: jojodillinger Date: 1/13/2015
Subject: Re: Steps To Get Running
Sorry for the mess, searching for "Axis Parameters" gave me this...

https://groups.yahoo.com/neo/groups/DynoMotion/conversations/messages/10147

And this already explains quite some of the questions..
Group: DynoMotion Message: 10815 From: jojodillinger Date: 1/13/2015
Subject: Re: Steps To Get Running
So the questions that are left are those:

1)
In KMotion.exe I define V and A in the "Step Response" screen.

a)
According to the manual, I should I fill in here the maximum allowable/meaningful values for the motors, right?

b)
What does the unit "position units per second" for the velocity mean? Does this relate to the "Inv Dist Per Cycle"? If the latter variable is set to default 1.0, the a "position unit" is equal to a full step? Or is it a microstep?


2)
If counts/inch, velocities, acceleration from the trajectory planer are the ones that count: can they be implemented in the initialization C-File as well? Or is there another way of backing up those?
In the end it would be really cool to have the initilization C-File, which fully defines the machine parameters.
Currently, as I understand, the actual machine parameters (in trajectory planer) are not part of the C-File.

As usual, thanks a lot:)
Kind regards,

Johannes
Group: DynoMotion Message: 10816 From: Moray Cuthill Date: 1/13/2015
Subject: Re: Steps To Get Running
1)
a) You set this as high as your system will allow, or as high as what's needed for the performance you desire. Off course you usually want to maintain to allow some safety margin in your settings.
b) "position units per second" is exactly what it says, however it is highly dependant on your system. For an openloop stepper system it would be the number of steps/microsteps per second, for a servo system it would be the number of encoder pulses per second.
"Inv Dist Per Cycle" IIRC relates to closed loop use, for if there is a ratio between the output steps/counts and the input steps/counts. i.e. you have a stepper that needs 800 pulses for one revolution, but has a 1000 count encoder.
 
2) All those settings get saved in KMotionCNC, as they are needed by the trajectory planner for planning motion.
KMotionCNC essentially just sends the init.c (or any other C program) to the KFlop for the KFlop to process. KMotionCNC can't actually read anything from the file, so any setting that gets used within KMotionCNC has to be stored in a file that KMotionCNC can read.
 
Moray

On Tue, Jan 13, 2015 at 10:32 PM, jojodillinger@... [DynoMotion] <DynoMotion@yahoogroups.com> wrote:
 

So the questions that are left are those:

1)
In KMotion.exe I define V and A in the "Step Response" screen.

a)
According to the manual, I should I fill in here the maximum allowable/meaningful values for the motors, right?

b)
What does the unit "position units per second" for the velocity mean? Does this relate to the "Inv Dist Per Cycle"? If the latter variable is set to default 1.0, the a "position unit" is equal to a full step? Or is it a microstep?


2)
If counts/inch, velocities, acceleration from the trajectory planer are the ones that count: can they be implemented in the initialization C-File as well? Or is there another way of backing up those?
In the end it would be really cool to have the initilization C-File, which fully defines the machine parameters.
Currently, as I understand, the actual machine parameters (in trajectory planer) are not part of the C-File.

As usual, thanks a lot:)
Kind regards,

Johannes


Group: DynoMotion Message: 10819 From: jojodillinger Date: 1/13/2015
Subject: Re: Steps To Get Running
Thanks Moray,

regarding "position units per second", for my openloop stepper motor this is microsteps/second I suppose, where microstep is 1/16th of a step, where 1 step is 1.8deg revolution of the motor. Would that be correct?

Your answer to my KMotionCNC question makes total sense, sorry, messed it up (probably to tired:).. KMotionCNC does not do anything with the initialization or any other C-File, other than sending to KFLOP..

Regards,

Johannes
Group: DynoMotion Message: 10820 From: Moray Cuthill Date: 1/13/2015
Subject: Re: Steps To Get Running
No problem.
 
Correct about the steps.
But just to ensure clarity and give an example, if you have a standard stepper (1.8deg/200steps per turn), then use 16x microsteps, it will take 3200 units (200x16) to turn one full revolution. If you then want a maximum speed of say 2 revolutions per second (120rpm), your position units per second setting would be 6400.
 
I'm sure we're all guilty of missing the obvious.
 
Moray

On Tue, Jan 13, 2015 at 11:14 PM, jojodillinger@... [DynoMotion] <DynoMotion@yahoogroups.com> wrote:
 

Thanks Moray,

regarding "position units per second", for my openloop stepper motor this is microsteps/second I suppose, where microstep is 1/16th of a step, where 1 step is 1.8deg revolution of the motor. Would that be correct?

Your answer to my KMotionCNC question makes total sense, sorry, messed it up (probably to tired:).. KMotionCNC does not do anything with the initialization or any other C-File, other than sending to KFLOP..

Regards,

Johannes


Group: DynoMotion Message: 10821 From: jojodillinger Date: 1/13/2015
Subject: Re: Steps To Get Running
All clear now, thanks for the example!
Johannes
Group: DynoMotion Message: 10824 From: jojodillinger Date: 1/14/2015
Subject: Re: Steps To Get Running
Hello all,

ok, next rather basic topic on CNC wiring and KFLOP. First of all, I dont yet have access to the machine, only from end of january on.. but absolutely thrilled to learn as much as possible before.

The CNC will have one reference switch on each axis (x,y,z) and as I understood from the manual, should connect to JP33 IO 168, 169, ...

Here are my questions:

1)
I dont yet really understand the ways how to tell KFLOP the moving limits of my machine, and especially, how to make sure I dont damage the mechanics by driving into the physical limitations..
Maybe you have a quick overview of how this is usually achieved in a simple 3-axis (+1 rotation) milling machine..

2)
As I understand, homing does move the axis towards the reference switch until it hits it, measuring the switchs output.
This should be done three times (once per axis). Referring to "SimpleHome3Axis.c", each axis is zeroed with the command "Zero(n)" where n is the axis-channel

a)
this will now be my machine-zero-location, right?
b)
when only having one switch per axis, I somehow have to tell KFLOP that my x-axis can travel for example 800mm from this zero-location on. Can you tell me where this is done?


3)
Can I use the reference switch at the same time also as a limit switch (by limit I mean a safety switch that prevents damage)?

4)
I guess the limit settings are done in the "Configuration and Flash Screen" under "Limit Switch Options".

a)
can I use the same IO bit (and thus the same switch) here that I use for homing?

b)
If so, I guess I have to install three more reference switches at the opposite side of each existing switch..


Again, thanks a lot for your help, I really appreciate!!

Kind regards,

Johannes
Group: DynoMotion Message: 10833 From: Moray Cuthill Date: 1/14/2015
Subject: Re: Steps To Get Running
1) Normally this is done at two levels. One being software, and one hardware.
At a software level, you set soft limits so that the KFlop knows the limits of travel, however for the soft limits to be valid, the machine has to be homed/referenced first.
At a hardware level, you have a set of limit switches, which when activated, ultimately remove power to motors. I say ultimately, as depending on the system there are several ways to acheive it, however the main thing is this is a hardware activation that does not rely on any form of software/processor to stop motion.
 
2)
a) It can be whatever location you'd like it to be, as you can modify the c file to set the dros to any value you like, however leaving it as zero is perfectly acceptable aswell. It can set via the config and flash screen in KMotion, which you can then transfer into your init.c file along with the axis parameters, or you can set it in another C program such as your homing program, however I can't remember the exact command at the moment.
b) See a). The value will be in counts, so you'll need to do a bit maths.
 
3) It can be done, however it's not advisable. I'm not sure what kind of machine you'll be using, but on larger machines it's best practise that limit switches are always active. Smaller low power machines, running into a mechanical stop usually isn't a problem, but on larger machines it can be quite painful.
 
4) It is possible to change settings on the fly, so you can quite easily change limit/home switch settings with some C code.
 
Moray

On Wed, Jan 14, 2015 at 12:07 PM, jojodillinger@... [DynoMotion] <DynoMotion@yahoogroups.com> wrote:
 

Hello all,

ok, next rather basic topic on CNC wiring and KFLOP. First of all, I dont yet have access to the machine, only from end of january on.. but absolutely thrilled to learn as much as possible before.

The CNC will have one reference switch on each axis (x,y,z) and as I understood from the manual, should connect to JP33 IO 168, 169, ...

Here are my questions:

1)
I dont yet really understand the ways how to tell KFLOP the moving limits of my machine, and especially, how to make sure I dont damage the mechanics by driving into the physical limitations..
Maybe you have a quick overview of how this is usually achieved in a simple 3-axis (+1 rotation) milling machine..

2)
As I understand, homing does move the axis towards the reference switch until it hits it, measuring the switchs output.
This should be done three times (once per axis). Referring to "SimpleHome3Axis.c", each axis is zeroed with the command "Zero(n)" where n is the axis-channel

a)
this will now be my machine-zero-location, right?
b)
when only having one switch per axis, I somehow have to tell KFLOP that my x-axis can travel for example 800mm from this zero-location on. Can you tell me where this is done?


3)
Can I use the reference switch at the same time also as a limit switch (by limit I mean a safety switch that prevents damage)?

4)
I guess the limit settings are done in the "Configuration and Flash Screen" under "Limit Switch Options".

a)
can I use the same IO bit (and thus the same switch) here that I use for homing?

b)
If so, I guess I have to install three more reference switches at the opposite side of each existing switch..


Again, thanks a lot for your help, I really appreciate!!

Kind regards,

Johannes


Group: DynoMotion Message: 10834 From: jojodillinger Date: 1/14/2015
Subject: Re: Steps To Get Running
Moray,

thanks a lot, as usual!

You say that the position when homing can be set in the Config and Flash screen. Do you have a hint..?

Currently, the homing script says "Zero(n)" This sets the DRO to zero. I google "DRO" and found: Digital readout counter, hope thats correct.. Just to be sure: DRO is not only the number thats displayed in a GUI, this is the position information KFLOP uses to relate soft limits and everything else to, right? And DRO is measured in counts (like almost everything)?
So if Im correct, I guess DRO corresponds to the machine coordinate system..

If instead of Zero I want to define the current DRO position to be 5000 counts (microsteps!), then from the manual I guess the command would be

Pos0=5000.0
..

In this case, I might define softlimits to be 5000 and -200, which then have to correspond to my physical limits (or close at least), if Im correct..

Kind regards!

Johannes

PS the CNC I will use is small, something like 800x500x170mm travel, just to give you an idea..








---In DynoMotion@yahoogroups.com, <moray.cuthill@...> wrote :

1) Normally this is done at two levels. One being software, and one hardware.
At a software level, you set soft limits so that the KFlop knows the limits of travel, however for the soft limits to be valid, the machine has to be homed/referenced first.
At a hardware level, you have a set of limit switches, which when activated, ultimately remove power to motors. I say ultimately, as depending on the system there are several ways to acheive it, however the main thing is this is a hardware activation that does not rely on any form of software/processor to stop motion.
 
2)
a) It can be whatever location you'd like it to be, as you can modify the c file to set the dros to any value you like, however leaving it as zero is perfectly acceptable aswell. It can set via the config and flash screen in KMotion, which you can then transfer into your init.c file along with the axis parameters, or you can set it in another C program such as your homing program, however I can't remember the exact command at the moment.
b) See a). The value will be in counts, so you'll need to do a bit maths.
 
3) It can be done, however it's not advisable. I'm not sure what kind of machine you'll be using, but on larger machines it's best practise that limit switches are always active. Smaller low power machines, running into a mechanical stop usually isn't a problem, but on larger machines it can be quite painful.
 
4) It is possible to change settings on the fly, so you can quite easily change limit/home switch settings with some C code.
 
Moray



Group: DynoMotion Message: 10836 From: jojodillinger Date: 1/15/2015
Subject: Re: Steps To Get Running
Hello,

I guess in my previous post I messed up some things. Apparently DRO is really just the readout on the screen?

Probably an explanation on coordinate systems would already clarify a lot.. Maybe you can help me with these questions:

How is the machine coordinate system defined and what are the commands to do so (are the "Zero" and the "Pos" command used for this?) ?

In which coordinate system are the  softlimits defined?

When homing and using "Zero()", which coordainte-system is then "zeroed" (x=0, y=0, z=0, a=0) ?

Thanks a lot, I really appreciate..:)
Kind regards,

Johannes
Group: DynoMotion Message: 10837 From: Moray Cuthill Date: 1/15/2015
Subject: Re: Steps To Get Running
Johannes,
 
DRO is simply Digital Read Out. When dealing with the KFlop, these are always in counts.
All limits options are defined within the KFlop, either via your init.c file, or via another C file that is run when requested i.e. such as your homing program. These values will always be in counts, and can be very large very precise numbers.
 
In KMotionCNC, the DROs displayed are in inches or mm. When in machine coordinates, they should be a direct conversion from the KFlop DROs, but you can apply various offsets to those basic readings, such as tool and work offsets, which can be applied using different methods.
 
The Pos0=5000, is what you would use via the KMotion console, it won't work in a C program.
In a C program you would have to use ch0->Position = 5000
 
While checking that, I noticed there is a basic sample file for using limit switches for homing - SimpleHomeLimits.c
 
Moray
 
 

On Thu, Jan 15, 2015 at 11:52 AM, jojodillinger@... [DynoMotion] <DynoMotion@yahoogroups.com> wrote:
 

Hello,

I guess in my previous post I messed up some things. Apparently DRO is really just the readout on the screen?

Probably an explanation on coordinate systems would already clarify a lot.. Maybe you can help me with these questions:

How is the machine coordinate system defined and what are the commands to do so (are the "Zero" and the "Pos" command used for this?) ?

In which coordinate system are the  softlimits defined?

When homing and using "Zero()", which coordainte-system is then "zeroed" (x=0, y=0, z=0, a=0) ?

Thanks a lot, I really appreciate..:)
Kind regards,

Johannes


Group: DynoMotion Message: 10838 From: jojodillinger Date: 1/15/2015
Subject: Re: Steps To Get Running
Thanks Moray,

ok. I guess I get it now. So DRO really is just what displayed in the GUI.


Maybe you can tell me if this here is correct..:

When only considering KLFOP (not KMotionCNC with all its offsets and so on), there is basically just one (machine) coordinate system / position.

The origin of the machine coordinate system is set to the current position of the axis with the command

ch0->Position = 0
ch1->Position = 0
ch2->Position = 0

(which is equivalent to Zero(0), Zero(1), Zero(2) , right?)

If this is correct up to here, now the important part:)
The axis softlimits only make sense, when referring to a coordinate system. Is the above described coordinate system the one the softlimits refer to?
So if I have soft limits of [-500 +10000] for ch0, from the above zero-position on my axis can move -500 or +10000 counts before hitting soft limit. (counts being equal to 1/16 of a full step, in my case of a STEP/DIR output).

Thanks a lot..
Kind regards,

Johannes





---In DynoMotion@yahoogroups.com, <moray.cuthill@...> wrote :

Johannes,
 
DRO is simply Digital Read Out. When dealing with the KFlop, these are always in counts.
All limits options are defined within the KFlop, either via your init.c file, or via another C file that is run when requested i.e. such as your homing program. These values will always be in counts, and can be very large very precise numbers.
 
In KMotionCNC, the DROs displayed are in inches or mm. When in machine coordinates, they should be a direct conversion from the KFlop DROs, but you can apply various offsets to those basic readings, such as tool and work offsets, which can be applied using different methods.
 
The Pos0=5000, is what you would use via the KMotion console, it won't work in a C program.
In a C program you would have to use ch0->Position = 5000
 
While checking that, I noticed there is a basic sample file for using limit switches for homing - SimpleHomeLimits.c
 
Moray
 
 

Group: DynoMotion Message: 10840 From: Moray Cuthill Date: 1/15/2015
Subject: Re: Steps To Get Running
That all sounds/looks correct to me.
 
A minor thing that might be stating the obvious, is each line of C code should finish with a semi-colon.
 
Moray

On Thu, Jan 15, 2015 at 4:49 PM, jojodillinger@... [DynoMotion] <DynoMotion@yahoogroups.com> wrote:
 

Thanks Moray,

ok. I guess I get it now. So DRO really is just what displayed in the GUI.


Maybe you can tell me if this here is correct..:

When only considering KLFOP (not KMotionCNC with all its offsets and so on), there is basically just one (machine) coordinate system / position.

The origin of the machine coordinate system is set to the current position of the axis with the command

ch0->Position = 0
ch1->Position = 0
ch2->Position = 0

(which is equivalent to Zero(0), Zero(1), Zero(2) , right?)

If this is correct up to here, now the important part:)
The axis softlimits only make sense, when referring to a coordinate system. Is the above described coordinate system the one the softlimits refer to?
So if I have soft limits of [-500 +10000] for ch0, from the above zero-position on my axis can move -500 or +10000 counts before hitting soft limit. (counts being equal to 1/16 of a full step, in my case of a STEP/DIR output).

Thanks a lot..
Kind regards,

Johannes





---In DynoMotion@yahoogroups.com, <moray.cuthill@...> wrote :

Johannes,
 
DRO is simply Digital Read Out. When dealing with the KFlop, these are always in counts.
All limits options are defined within the KFlop, either via your init.c file, or via another C file that is run when requested i.e. such as your homing program. These values will always be in counts, and can be very large very precise numbers.
 
In KMotionCNC, the DROs displayed are in inches or mm. When in machine coordinates, they should be a direct conversion from the KFlop DROs, but you can apply various offsets to those basic readings, such as tool and work offsets, which can be applied using different methods.
 
The Pos0=5000, is what you would use via the KMotion console, it won't work in a C program.
In a C program you would have to use ch0->Position = 5000
 
While checking that, I noticed there is a basic sample file for using limit switches for homing - SimpleHomeLimits.c
 
Moray
 
 


Group: DynoMotion Message: 10841 From: jojodillinger Date: 1/15/2015
Subject: Re: Steps To Get Running
Thanks Moray! Will try to be quiet till I actually have the machine (to not so often ask obvious stuff).. Cant promise though, too tempting all this KLOP business:)